package com.ppp.poi.web;

import com.ppp.poi.bean.base.AppResult;
import com.ppp.poi.bean.dto.PoiParam;
import com.ppp.poi.service.GaodeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Wu Jin
 * @create 2020-01-20
 */
@Slf4j
@RestController
@RequestMapping("/search")
public class SearchController {

  @Autowired
  private GaodeService gaodeService;

  /**
   * 查询poi数据
   */
  @GetMapping()
  public AppResult getPoi(PoiParam poiParam) {
    log.info("search参数={}", poiParam.toString());
    gaodeService.search(poiParam);
    return AppResult.ok();
  }

}
